﻿using System;
using System.ComponentModel;
using System.Drawing;
using Microsoft.WowAddonStudio.FrameXml.Components.Events;
using Microsoft.WowAddonStudio.FrameXml.Serialization;
using Microsoft.WowAddonStudio.FrameXml.Serialization.LayoutFrames;

namespace Microsoft.WowAddonStudio.FrameXml.Components
{
    [ToolboxItem(false)]
    [ToolboxBitmap(typeof(System.IO.FileSystemWatcher), "FileSystemWatcher.bmp")]
    [ToolboxItemFilter("WowAddonStudio", ToolboxItemFilterType.Require)]
    [EventGroup(EventGroup.Frame, EventName.OnLoad)]
    public class WorldFrameControl : FrameControl
    {

		/// <summary>
		/// Initializes a new instance of the <see cref="WorldFrameControl"/> class.
		/// </summary>
    	public WorldFrameControl()
    	{
    	}

    	/// <summary>
        /// Initializes a new instance of the <see cref="WorldFrameControl"/> class.
        /// </summary>
        /// <param name="frame">The world frame.</param>
        public WorldFrameControl(WorldFrame frame)
            : base(frame)
        {
        }

		/// <summary>
		/// Gets the WorldFrame.
		/// </summary>
		public WorldFrame WorldFrame
		{
			get { return SerializationObject as WorldFrame; }
		}

		/// <summary>
		/// Gets the type of the serialization object this control manages.
		/// </summary>
		public override Type SerializationObjectType
		{
			get
			{
				return typeof(WorldFrame);
			}
		}
    }
}
